package zack.project.domain.award.service;

import zack.project.domain.award.model.entity.DistributeAwardEntity;
import zack.project.domain.award.model.entity.UserAwardRecordEntity;

/**
 * @author A1793
 */
public interface IAwardService {

    /**
     * 保存中奖记录(更新数据库表{user_raffle_award})和发奖的任务(该任务是为了防止本方法中发送消息失败的补偿任务，更新数据库表{task})，
     * 更新抽奖单状态为used(更新库表{user_raffle_order}) 并 向SendAwardCustomer监听的消息队列投入发奖消息
     * @param userAwardRecordEntity
     */
    void saveUserAwardRecord(UserAwardRecordEntity userAwardRecordEntity);

    void distributeAward(DistributeAwardEntity distributeAwardEntity);

    String queryAwardConfig(Integer awardId);
}
